<template>
  <a-modal v-model:visible="visible" :closable="false" :mask-closable="false"  draggable>
    <template #title> {{agreementType == 'user' ? '用户协议':'隐私协议'}} </template>
    <div class="agreement_height">
      <p>
        {{agreementType == 'user' ? '用户协议':'隐私协议'}}
      </p>
    </div>
    <template #footer>
       <div class="flex justify-center">
        <a-button @click="visible = false">我已知晓</a-button>
       </div>
    </template>
  </a-modal>
</template>

<script setup>
import { ref } from 'vue'

const props = defineProps({
    agreementType:{
        trpe: String,
        default:'user'
    }
})

const visible = ref(false)

//打开弹窗
const open = () => (visible.value = true)
//关闭弹窗
const close = () => (visible.value = false)

defineExpose({
    open,
    close,
})
</script>

<style lang="scss" scoped>
.agreement_height{
    height:600px;
    overflow-y: scroll;
}

</style>
